<?php

abstract class Validate_Abstract {

  protected $_params;

  public function __construct($params) {
    foreach ($params as $key => $value) {
      $this->_params[$key] = $value;
    }
  }

  public function getParam($name) {
    return @$this->_params[$name];
  }

  public function getLevel() {
    return isset($this->_params['level']) ? $this->_params['level'] : 1;
  }

  abstract function getMessage($value);

  abstract function isValid($value);
}